*/
function parseQuery( $filteredText, $fulltext ) {
global $wgContLang;
- $lc = $this->legalSearchChars();
+ $lc = $this->legalSearchChars( self::CHARS_NO_SYNTAX );
$this->searchTerms = [];
# @todo FIXME: This doesn't handle parenthetical expressions.
[] );
}
- public static function legalSearchChars() {
- return "\"" . parent::legalSearchChars();
+ public static function legalSearchChars( $type = self::CHARS_ALL ) {
+ $searchChars = parent::legalSearchChars( $type );
+ if ( $type === self::CHARS_ALL ) {
+ $searchChars = "\"" . $searchChars;
+ }
+ return $searchChars;
}
}